package com.org.model;

/**
 * AdminRoleId entity. @author MyEclipse Persistence Tools
 */

public class AdminRoleId implements java.io.Serializable {

	// Fields

	private Admin admin;
	private Role role;

	// Constructors

	/** default constructor */
	public AdminRoleId() {
	}

	/** full constructor */
	public AdminRoleId(Admin admin, Role role) {
		this.admin = admin;
		this.role = role;
	}

	// Property accessors

	public Admin getAdmin() {
		return this.admin;
	}

	public void setAdmin(Admin admin) {
		this.admin = admin;
	}

	public Role getRole() {
		return this.role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AdminRoleId))
			return false;
		AdminRoleId castOther = (AdminRoleId) other;

		return ((this.getAdmin() == castOther.getAdmin()) || (this.getAdmin() != null
				&& castOther.getAdmin() != null && this.getAdmin().equals(
				castOther.getAdmin())))
				&& ((this.getRole() == castOther.getRole()) || (this.getRole() != null
						&& castOther.getRole() != null && this.getRole()
						.equals(castOther.getRole())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getAdmin() == null ? 0 : this.getAdmin().hashCode());
		result = 37 * result
				+ (getRole() == null ? 0 : this.getRole().hashCode());
		return result;
	}

}